<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">

    <title>登录[[${projectName}]]系统</title>
    <link href="/ui/css/login.css" th:href="@{/ui/css/login.css}" rel="stylesheet" type="text/css" />
    <link href="/ui/css/font-awesome.min.css" rel="stylesheet" />


    <link rel="shortcut icon" href="../../static/favicon.ico" th:href="@{favicon.ico}"/>
    <style type="text/css">label.error { position:inherit;  }</style>
    <script>
        localStorage.removeItem("lockScreen");
        if (window.top !== window.self) { window.top.location = window.location; }
    </script>
</head>
<body>
<div style="text-align:center;">
    <p></p>
</div>
<div class="login_box">
    <div class="login_l_img"><img src="/ui/images/login-img.png" /></div>
    <div class="login">
        <div class="login_logo"><a href="#"><img src="/ui/images/login_logo.png" /></a></div>
        <div class="login_name">
            <p>[[${projectName}]]管理系统</p>
        </div>
        <form method="post" action="/login/LoginOn">
            <input name="uname" id="uname" type="text" value="" placeholder="用户名" required >
            <input name="pwd" type="password" id="pwd" placeholder="密码" required/>
            <input value="登录" style="width:100%;" type="button" onclick="loginBoot()">
            <div class="text-center p-t-8 p-b-31" style="color: red;">

            </div>
        </form>
    </div>
    <div class="copyright">[[${projectName}]] 版权所有© [[${copyrightYear}]]</div>
</div>

<!--统计代码，可删除-->
   <script src="/ui/js/jquery.min.js"></script>
<script src="/ui/plugins/blockUI/jquery.blockUI.js"></script>
   <script th:src="@{/ui/plugins/layer/layer.min.js}"></script>
    <script src="/ui/easycms/js/jutils.js"></script>
    <script>
        function loginBoot(){
            let uname=$('#uname').val();
            let pwd=$('#pwd').val();
            if(jutils.empty(uname)){
                jutils.warn("请输入登录用户名");
                return;
            }
            if(jutils.empty(pwd)){
                jutils.warn("请输入登录密码");
                return;
            }

            jutils.ajaxPost('/loginOn',{username:uname,password:pwd},function(res){
                  if(res.status){
                          location.href=res.data.url;
                  }

            });
        }
    </script>
</body>
</html>
